-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Dockerfile
template
#400
feat: add Dockerfile
template
#400
Conversation
# Motivation More and more applications are being run natively in containers, for a variety of reasons. This commit is the initial attempt to provide containerized support for `SolrWayback`. # Usage To get going, simply run the following command: ```bash docker build . --tag solrwayback docker run --publish 8080:8080 --publish 8983:8983 --volume \ <path/to/WARCs>:/host_dir --tty --interactive solrwayback bash ``` where `<path/to/WARCs>` only contains `WARC` files and directories. For more details, please refer to the comments in the `Dockerfile`. # Implementation The `Dockerfile` was created by following the instructions in the top-level readme. In addition to this, a few verification steps were added to ensure that the container works as expected. A simple test that uses `docker` to build the container has been added. # Drawbacks ## No proper indexing test The added test does not verify that indexing works as expected. This should be done by adding some `WARC` files as test data, but this is outside the scope of this commit. ## No automatic update to latest release Whenever someone releases a new version of `SolrWayback`, there is no reminder or automatic failure if the relevant people forget to update the `Dockerfile`. # Future work ## Index preservation The `Dockerfile` does currently not preserve the created index, so it needs to be manually copied out of the container in order to preserve it. With the latest released `SolrWayback` bundle, the index can be found here: `unpacked-bundle/solrwayback_package_4.4.2/solr-7.7.3/server/solr/ configsets/netarchivebuilder/netarchivebuilder_data/index/` ## Custom configuration of `properties` There is currently no way of using your own `solrwayback.properties` and `solrwaybackweb.properties`, which is essential for using the correct branding.
I will try have a look at this later this week. It is important you can add your own WARC-files as you have documented. There is no need to have some default WARC-files included. If users want to try SolrWayback they can just go to live web and How do you see the solrwayback.log and solrwayback_error.log files? Can you open a terminal inside the docker? Then you should also be able to edit the two property files if needed? I tried run the github workflow on the branch and it passed. For some reason the old docker example (I deleted) would make github fail workflow runs, so we never know if it could even compile. I never understood why github would care about a docker file in the root folder, but this PR seems to cause no problems. Also using the SolrWayback Bundle for installing everything makes everything so much easier. The old docker had a full git checkout of solrwayback that was build and WAR-file deployed into tomcat. But I guess you can just have a git checkout outside the docker container and then easy copy the WAR-file into the docker tomcat? This could be useful for people trying to create PR etc. |
If you follow the instructions provided in
My approach is to not deal with If you take a look at the
You could manually use This is of course not a silver bullet, as you might have a different use-case where it makes sense to copy files instead of mounting them. But this is also not the point of this pull request, it is simply for having a sample that you can start modifying. For example, there is a use-case for mounting a different directory for exporting the index that is created, which might be added as a follow-up. |
In preparation to creating a container image for deployment in a cluster, this commit adds the initial `Dockerfile` to the repository. This is no way a final version, but it is a good starting point. The dockerfile was taken from this Pull request: netarchivesuite/solrwayback#400
# Motivation To avoid accidentally breaking the docker image while developing, we should build the image in CI. The code was copied from pull request: netarchivesuite/solrwayback#400
# Motivation To avoid accidentally breaking the docker image while developing, we should build the image in CI. The code was copied from pull request: netarchivesuite/solrwayback#400
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working as expected.
Thanks.
Motivation
More and more applications are being run natively in containers, for a variety of reasons. This commit is the initial attempt to provide containerized support for
SolrWayback
.Usage
To get going, simply run the following command:
where
<path/to/WARCs>
only containsWARC
files and directories.For more details, please refer to the comments in the
Dockerfile
.Implementation
The
Dockerfile
was created by following the instructions in the top-level readme. In addition to this, a few verification steps were added to ensure that the container works as expected.A simple test that uses
docker
to build the container has been added.Drawbacks
No proper indexing test
The added test does not verify that indexing works as expected. This should be done by adding some
WARC
files as test data, but this is outside the scope of this commit.No automatic update to latest release
Whenever someone releases a new version of
SolrWayback
, there is no reminder or automatic failure if the relevant people forget to update theDockerfile
.Future work
Index preservation
The
Dockerfile
does currently not preserve the created index, so it needs to be manually copied out of the container in order to preserve it. With the latest releasedSolrWayback
bundle, the index can be found here:unpacked-bundle/solrwayback_package_4.4.2/solr-7.7.3/server/solr/ configsets/netarchivebuilder/netarchivebuilder_data/index/
Custom configuration of
properties
There is currently no way of using your own
solrwayback.properties
andsolrwaybackweb.properties
, which is essential for using the correct branding.